Skip to content

fix: Prevent null dereference in AITNGuardOuterState update - #589

Merged
x64-dev merged 1 commit into
mainfrom
seer/fix/ai-guard-outer-state-null-deref
Sep 3, 2026
Merged

fix: Prevent null dereference in AITNGuardOuterState update#589
x64-dev merged 1 commit into
mainfrom
seer/fix/ai-guard-outer-state-null-deref

Conversation

@sentry

@sentry sentry Bot commented Sep 3, 2026

Copy link
Copy Markdown

This PR addresses a fatal crash (EXCEPTION_ACCESS_VIOLATION_READ) occurring in AITNGuardOuterState::update().

The root cause was identified as a null pointer dereference of m_attackState. The onEnter() method for AITNGuardOuterState can return early with STATE_SUCCESS if the guard mode is GUARDMODE_GUARD_WITHOUT_PURSUIT or if the nemesis object is null. In these scenarios, m_attackState is never initialized, remaining nullptr.

Subsequently, when AITNGuardOuterState::update() is called, it attempts to access m_attackState->getMachineGoalObject() without first checking if m_attackState is valid, leading to a crash.

The fix introduces a null-check at the beginning of AITNGuardOuterState::update(). If m_attackState is nullptr, the method now safely returns STATE_SUCCESS, aligning its behavior with the early-exit conditions of onEnter() and preventing the dereference of an uninitialized pointer.

Fixes CLIENT-19W

@x64-dev
x64-dev merged commit 1a6edf1 into main Sep 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant